<%
'''生成随机字符串
'p_length:要生成的随机字符串长度
'p_type:随机码类型：0，数字+大写字母；1，数字；2，小写字母；3，大写字母；4，特殊字符；5，数字+大小写字母+特殊字符
Function rand_code(Byval p_length, Byval p_type)
	Dim t_arr(5)
	t_arr(0) = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	t_arr(1) = "0123456789"
	t_arr(2) = "abcdefghijklmnopqrstuvwxyz"
	t_arr(3) = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	t_arr(4) = "~@#$%^&*(){}[]|"
	t_arr(5) = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~@#$%^&*(){}[]|"
	Dim t_i, t_select, t_len, t_str, t_sub
	t_select = t_arr(p_type)
	t_len = Len( t_select )
	t_str = ""
	For t_i = 1 To p_length
		Randomize(Timer())
		t_sub = int( t_len * Rnd() )
		t_str = t_str & Mid(t_select, t_sub, 1)
	Next
	rand_code = t_str
End Function
%>